import { AjaxService, Req, Res } from "./ajax.service"
import { Injectable } from '@angular/core'

import { Milestone } from "./milestone"

@Injectable()
export class MilestoneService {
  private bh = AjaxService.APIROOT + '/milestones';

  delete(id): Promise<Res> {
    var argv = { id: id, token: localStorage.getItem("token") }
    return AjaxService.request(new Req(`${this.bh}/${id}.json`, "DELETE", argv))
  }
}
